﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace UI.Forms
{
    public partial class wsd_search : FormBase1
    {
        public wsd_search()
        {
            InitializeComponent();
        }

        private void wsd_search_Load(object sender, EventArgs e)
        {
            dateselect1.lue_date.Properties.DataSource = my.dts;
            dateselect1.lue_date.EditValue = 0;
        }

        private void btn_search_Click(object sender, EventArgs e)
        {
            DateTime? sd=null;
            DateTime? ed=null;
            if (dateselect1.de_sd.EditValue!=null)
	        {
		        sd=dateselect1.de_sd.DateTime;
	        }
            if (dateselect1.de_ed.EditValue!=null)
	        {
		        ed=dateselect1.de_ed.DateTime;
	        }
            gridControl1.DataSource = my.bw.wsd_get_By_date(sd, ed, my.ACID);
        }

        private void btn_print_Click(object sender, EventArgs e)
        {
            gridControl1.ShowPrintPreview();
        }
    }
}